---
title: Quickstart
---

To create a research agent that can conduct thorough investigations:

<CodeGroup>

```python Python
from tavily import TavilyClient
from deepagents import create_deep_agent
import os

def internet_search(query):
    tavily_client = TavilyClient(api_key=os.environ["TAVILY_API_KEY"])
    return tavily_client.search(query)

research_instructions = """You are an expert researcher.
Your job is to conduct thorough research, and then write a polished report.

You have access to tools for internet search and file operations.
"""

agent = create_deep_agent(
    tools=[internet_search],
    instructions=research_instructions
)

result = agent.invoke({
    "messages": [{"role": "user", "content": "what is langgraph?"}]
})
```

```typescript JavaScript
import { TavilySearch } from "@langchain/tavily";
import { createDeepAgent } from "deepagents";

// Search tool to use to do research
const internetSearch = new TavilySearch({
  maxResults: 5,
  tavilyApiKey: process.env.TAVILY_API_KEY,
});

// Prompt prefix to steer the agent to be an expert researcher
const researchInstructions = `You are an expert researcher. Your job is to conduct thorough research, and then write a polished report.

You have access to a few tools.

## \`internet_search\`

Use this to run an internet search for a given query. You can specify the number of results, the topic, and whether raw content should be included.
`;

// Create the agent
const agent = createDeepAgent({
  tools: [internetSearch],
  instructions: researchInstructions,
});

// Invoke the agent
const result = await agent.invoke({
  messages: [{ role: "user", content: "what is langgraph?" }]
});
```

</CodeGroup>

The agent created with `createDeepAgent` is a LangGraph graph, so you can interact with it (streaming, human-in-the-loop, memory, studio) the same way you would any LangGraph agent.
